
//
//  FirstVC.m
//  KeyBoard
//
//  Created by MyMac on 15/10/23.
//  Copyright © 2015年 tongfang. All rights reserved.
//

#import "FirstVC.h"
#import "SecondVC.h"
#import "CustomTool.h"
@interface FirstVC()

@end
@implementation FirstVC
-(void)viewDidLoad{
    [super viewDidLoad];
    self.view.backgroundColor=[UIColor yellowColor];
    UITextField*filed=[[UITextField alloc]initWithFrame:CGRectMake(0, self.view.bounds.size.height-44, self.view.bounds.size.width, 44)];
    filed.backgroundColor=[UIColor redColor];
    [self.view addSubview:filed];
    
    UIButton*btn=[[UIButton alloc]initWithFrame:CGRectMake(0, 100, 50, 60)];
    btn.backgroundColor=[UIColor greenColor];
    [btn addTarget:self action:@selector(btnClick) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:btn];
 [[CustomTool shareCustomTool] toolKeyBoardShowAndHideOperatuonWithshowOPeration:^(CGRect keyBoardFrame, CGFloat animationDuration, NSDictionary *userInfo) {
     //NSLog(@" show");

 } hideOPeration:^(CGRect keyBoardFrame, CGFloat animationDuration, NSDictionary *userInfo) {
    // NSLog(@" hide");

 }];

}

-(void)btnClick{
    SecondVC*vc=[[SecondVC alloc]init];
    
    [self.navigationController pushViewController:vc animated:YES];

}
-(void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event{
    [self.view endEditing:YES];
    
    
}
-(void)dealloc{



}
@end
